feat(new_metrics): support server_stat command showing some important server-level metrics (part 3)#2385
Merged
empiredan merged 3 commits intoapache:masterfrom Mar 18, 2026
Conversation
… server-level metrics (part 3)
4 tasks
acelyc111-bot
left a comment
There was a problem hiding this comment.
Review: server_stat metrics expansion
Summary: Adds 3 new metrics to the command output: , , and . Also expands entity filter to include type.
What's good:
- Clean, consistent implementation — follows existing patterns for struct fields, JSON serialization, and aggregation
- Proper use of for replica-level metrics being aggregated across nodes
- Minimal, focused change (1 file, +45/-14)
Notes:
- The is fetched from the entity but the other two compaction metrics come from entity — this is correct since block cache is shared at server level while compaction tasks are per-replica, but worth documenting
- No unit tests added — consider adding a test for the JSON serialization roundtrip if there's an existing test file for this
Verdict: ✅ Approve — Looks ready to merge. Clean implementation, follows existing conventions.
acelyc111-bot
left a comment
There was a problem hiding this comment.
Review: server_stat metrics expansion
Summary: Adds 3 new metrics to the server_stat command output: rdb_block_cache_mem_usage_bytes, rdb_manual_compact_queued_tasks, and rdb_manual_compact_running_tasks. Also expands entity filter to include replica type.
What's good:
- Clean, consistent implementation — follows existing patterns for struct fields, JSON serialization, and aggregation
- Proper use of
create_sumsfor replica-level metrics being aggregated across nodes - Minimal, focused change (1 file, +45/-14)
Notes:
- The block cache metric is fetched from the
serverentity while compaction metrics come fromreplicaentity — correct design, but could use a comment explaining the distinction - No unit tests added — consider adding a test for the JSON serialization roundtrip if there's an existing test file for this
Verdict: ✅ Approve — Looks ready to merge. Clean implementation, follows existing conventions.
foreverneverer
approved these changes
Mar 17, 2026
GehaFearless
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2382
Add metrics related to the number of RocksDB as the 3rd part to be shown by
server_statcommand.